/*
 * pH+ Form Class
 *
 * Available Options:
 *
 * 	container(required):		 	Where is the form going to be
 * 	data(required) :		  	 	pH Data Object.
 * 	template:									pH Template Object.
 */

pH.Form = function(config)
{

	this.data 		= config.data;
	this.template = config.template;

	var fields 	= config.data.getFields();
	var replace = {};

	for (var i in fields)
	{
		replace[i] = '<input name="' + fields[i].name + '" />'; 
	}

	var content = config.template.replace(replace);

	config.container.innerHTML = content;
}

